package com.hgd.igreencar.biz.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.hgd.igreencar.biz.IVehicleExhaustPlusBiz;
import com.hgd.igreencar.dao.VehicleExhaustPlusMapper;
import com.hgd.igreencar.entity.VehicleExhaustPlus;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class VehicleExhaustPlusBizImpl implements IVehicleExhaustPlusBiz {

    @Autowired
    private VehicleExhaustPlusMapper vehicleExhaustPlusMapper;

    @Override
    public PageInfo<VehicleExhaustPlus> queryAllData(int currentPage, int pageSize) {
        PageHelper.startPage(currentPage,pageSize);
        PageInfo pageInfo = new PageInfo(vehicleExhaustPlusMapper.queryAllData(currentPage,pageSize));
        return pageInfo;
    }

    @Override
    public PageInfo<VehicleExhaustPlus> queryAllOverData(int currentPage, int pageSize) {
        PageHelper.startPage(currentPage,pageSize);
        PageInfo pageInfo = new PageInfo(vehicleExhaustPlusMapper.queryAllOverData(currentPage,pageSize));
        return pageInfo;
    }

    @Override
    public PageInfo queryData(String areaName, String brandName, String letoutName, int currentPage, int pageSize) {
        PageHelper.startPage(currentPage,pageSize);
        PageInfo pageInfo = new PageInfo(vehicleExhaustPlusMapper.queryData(areaName, brandName, letoutName,currentPage,pageSize));
        return pageInfo;
    }

    @Override
    public PageInfo queryByOver(String areaName, String brandName, String letoutName, int currentPage, int pageSize) {
        PageHelper.startPage(currentPage,pageSize);
        PageInfo pageInfo = new PageInfo(vehicleExhaustPlusMapper.queryByOver(areaName, brandName, letoutName,currentPage,pageSize));
        return pageInfo;
    }

}
